package visualizer.graphics;

import processing.core.PVector;

public class Point {
	public final int x;
	public final int y;
	
	public Point(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public Point(PVector v)
	{
		this((int) v.x, (int) v.y);
	}
	
	public boolean equals(Object o)
	{
		if (!(o instanceof Point)) {
			return false;
		}
		Point other = (Point) o;
		return (x == other.x) && (y == other.y);
	}
	
	public int hashCode() {
		return x + y;
	}
}
